import thunk from 'redux-thunk';
//1. 引入 redux 中的 createStore 函数   
import {createStore, applyMiddleware, combineReducers} from 'redux';
import ZanReducer from './reducers/ZanReducer';
import CangReducer from './reducers/CangReducer';

//合并 reducer 函数
let rootReducer = combineReducers({
    zan: ZanReducer,
    cang: CangReducer
});

// store.getState() => {zan: 0, cang: 0}
//暴露数据
export default createStore(rootReducer, applyMiddleware(thunk));





